package com.member.shop.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.member.common.annotation.Excel;
import com.member.common.core.domain.BaseEntity;
import com.member.shop.vo.GoodsRefundListVo;
import com.member.shop.vo.OrderGoodsVo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 订单售后对象 sys_biz_order_service
 *
 * @author luoyun
 * @date 2025-01-24
 */
@Data
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_biz_order_service")
public class SysBizOrderService extends BaseEntity {

    private static final long serialVersionUID=1L;


    /**
     * 唯一id
     */
    @TableId(type = IdType.AUTO)
    private Long id;


    /**
     * 订单id
     */
    @Excel(name = "订单id")
    private String orderId;

    /**
     * 商品Json
     */
    @Excel(name = "商品Json")
    private String goodsInfo;


    /**
     * 用户
     */
    @Excel(name = "用户")
    private Long userId;


    /**
     * 退回金额
     */
    @Excel(name = "退回金额")
    private BigDecimal refundAmount;


    /**
     * 退款编号
     */
    @Excel(name = "退款编号")
    private String refundNo;


    /**
     * 退款方式 0 原路返回
     */
    @Excel(name = "退款方式 0 原路返回")
    private Long refundType;


    /**
     * 退款时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "退款时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date refundTime;


    /**
     * 退款状态 0 未退款 1 退款成功 2 退款失败
     */
    @Excel(name = "退款状态 0 未退款 1 退款成功 2 退款失败")
    private Long refundStatus;


    /**
     * 退货原因
     */
    @Excel(name = "退货原因")
    private String returnReason;


    /**
     * 审核状态  0 未审核(售后中) 1 审核通过(售后成功) 2 审核不通过(售后失败)
     */
    @Excel(name = "审核状态  0 未审核 1 审核通过 2 审核不通过")
    private Long auditStatus;


    /**
     * 审核时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date auditTime;


    /**
     * 审核原因
     * (商家描述)
     */
    @Excel(name = "审核原因")
    private String auditReason;


    /**
     * 审核人
     */
    @Excel(name = "审核人")
    private String auditBy;


    /**
     * 申请时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date applyTime;


    /**
     * 申请凭证图片
     */
    @Excel(name = "申请凭证图片")
    private String voucherImages;


    /**
     * 申请补充描述及凭证
     */
    @Excel(name = "申请补充描述及凭证")
    private String applyReason;

    /**
     *租户id
     */
    @TableField(exist = false)
    private Long tenantId;

    /**
     * 订单code
     */
    private String orderCode;


    /**
     * 下单人
     */
    private String userName;


    /**
     * 下单手机号
     */
    private String userPhone;


    /**
     * 商品Json
     */
    @TableField(exist = false)
    private List<GoodsRefundListVo> goodsRefundList;

}
